import request from '@/utils/request'

export function upload(params) {
  return request(({
    url: '/saveNews',
    method: 'post',
    data: params
  }))
}

export function getNewsById(params) {
  return request(({
    url: '/news/getNewsById',
    method: 'get',
    params
  }))
}

export function getNews(params) {
  return request(({
    url: '/news/getNews',
    method: 'get',
    params
  }))
}
export function addNews(params) {
  return request(({
    url: '/news/addNews',
    method: 'post',
    data: params
  }))
}

export function updateAvatar(params) {
  return request(({
    url: '/updateAvatar',
    method: 'post',
    data: params
  }))
}
